package com.testdocs.client.signin.event;

import com.google.gwt.event.shared.GwtEvent;
import com.testdocs.client.signin.UserInfo;

public class SignInEvent  extends GwtEvent<SignInEventHandler>{
	public static Type<SignInEventHandler> TYPE = new Type<SignInEventHandler>();
	
	private UserInfo loginInfo;

	public SignInEvent(UserInfo loginInfo) {
		this.loginInfo = loginInfo;
	}
	
	@Override
	protected void dispatch(SignInEventHandler handler) {
		handler.signedIn(this);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<SignInEventHandler> getAssociatedType() {
		return TYPE;
	}
	
	public UserInfo getLoginInfo() {
		return loginInfo;
	}
}
